import Vue from "vue";
import App from "./App.vue";
import VueI18n from "vue-i18n";
import laguages from "./languages";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
import { loadFilters } from "./filters";
import { loadDirective } from "./directive";

import "brainy-style";
import "./assets/font-awesome/scss/font-awesome.scss";
import { init as initFacebook } from '@/utils/facebook';
import { ImagePreview,Loading, Skeleton, PullRefresh, Overlay, ActionSheet, Col, Row, Checkbox, CheckboxGroup, Grid, GridItem, Icon, Image, NavBar, Picker, Popup, Search, Tabbar, TabbarItem, Toast, Form, Field, Locale, Button, Tabs, Tab, Divider, Radio, RadioGroup, Swipe, SwipeItem, Tag, Collapse, CollapseItem, List, DropdownMenu, DropdownItem, Uploader, Dialog, CellGroup, Cell } from "vant";
import enUS from "vant/es/locale/lang/en-US";
// import VueSocialSharing from 'vue-social-sharing'

initFacebook();
// Vue.use(VueSocialSharing);
Vue.use(Toast);
Vue.use(Dialog);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Search);
Vue.use(Popup);
Vue.use(Picker);
Vue.use(Icon);
Vue.use(Image);
Vue.use(NavBar);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Form);
Vue.use(Field);
Vue.use(Button);
Vue.use(Tabs);
Vue.use(Tab);
Vue.use(Divider);
Vue.use(RadioGroup);
Vue.use(Radio);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tag);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(List);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Uploader);
Vue.use(CellGroup);
Vue.use(Cell);
Vue.use(Col);
Vue.use(Row);
Vue.use(ActionSheet);
Vue.use(Overlay);
Vue.use(PullRefresh);
Vue.use(Skeleton);
Vue.use(Loading);
Vue.use(ImagePreview);


Vue.use(VueI18n);

Locale.use("en-US", enUS);

Vue.config.productionTip = false;

const i18n = new VueI18n({
  locale: localStorage.getItem("LANGUAGE") || "pt",
  messages: laguages,
});

window.$lang = i18n;

loadFilters(Vue);
loadDirective(Vue);

new Vue({
  router,
  store,
  i18n,
  render: (h) => h(App),
}).$mount("#app");
